package com.hmall.mapper;

import com.hmall.model.XtxArticle;
import com.hmall.util.MyMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface XtxArticleMapper extends MyMapper<XtxArticle> {
    Integer selectForwardingCountByArticleId(@Param("articleId") Integer articleId);

    Integer selectCountByUserId(@Param("userId") Integer userId);

    Integer selectCountByKeyword(@Param("keyword") String keyword);

    List<XtxArticle> selectByKeyWord(@Param("keyword") String keyword,@Param("pageStart") Integer pageStart,@Param("pageSize") Integer pageSize);

    Integer selectFocusCountByKeyword(@Param("keyword")String keyword,@Param("userId") Integer userId);

    List<XtxArticle> selectFocusArticleByKeyWord(@Param("keyword")String keyword,@Param("userId") Integer userId,@Param("pageStart") Integer pageStart,@Param("pageSize") Integer pageSize);
}